#include "Socket.h"
#include <iostream>
#include <sys/socket.h>
#include <unistd.h>

Socket::Socket()
{
    _sockfd = ::socket(AF_INET, SOCK_STREAM, 0);
    if(_sockfd < 0)
    {
        std::cerr << "::socket\n";
        return;
    }
}
Socket::Socket(int sockfd)
: _sockfd(sockfd)
{
}

Socket::~Socket()
{
    ::close(_sockfd);
}
